#pragma once

// Basic stuff.
#include <cmath>
#include <iostream>
#include <stdio.h>
#include <io.h>
#include <stdlib.h>
#include <limits>

// STL.
#include <stack>
#include <queue>
#include <deque>
#include <vector>
#include <memory>	// auto_ptr. http://ootips.org/yonat/4dev/smart-pointers.html.
#include <string>
#include <utility>	// pair.
#include <iterator>
#include <fstream>
#include <algorithm>
using namespace std;

// Must define the DLL before we include the header.
// For ease of use I put the dll/libs in the project folder.
#define GLFW_DLL
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "glu32.lib")
#pragma comment(lib, "GLFW.lib")
#pragma comment(lib, "GLFWDLL.lib")
#pragma comment(lib, "assimp.lib")
#pragma comment(lib, "ILU.lib")
#pragma comment(lib, "ILUT.lib")
#pragma comment(lib, "DevIL.lib")
#include <GL/glfw.h>

#include "glext.h"

// Extensions
#include "myGlExtensions.h"

// assimp include files. These three are usually needed.
#include "../include/assimp/assimp.hpp"	//OO version Header!
#include "../include/assimp/aiPostProcess.h"
#include "../include/assimp/aiScene.h"
#include "../include/assimp/DefaultLogger.h"
#include "../include/assimp/LogStream.h"

// GLM
#include "../include/glm/glm.hpp"
#include "../include/glm/gtc/matrix_transform.hpp"
#include "../include/glm/gtc/quaternion.hpp"
#include "../include/glm/gtx/rotate_vector.hpp"
#include "../include/glm/gtx/random.hpp"

// FMOD.
#include "../include/fmod/fmod.hpp"
#include "../include/fmod/fmod_errors.h"

	// Libraries.
#pragma comment(lib, "../lib/fmod/fmodex_vc.lib")

// Havok
	// Common
#include <Common/Base/hkBase.h>
#include <Common/Base/Memory/System/Util/hkMemoryInitUtil.h>
#include <Common/Base/Memory/Allocator/Malloc/hkMallocAllocator.h>
#include <Common/Base/Container/String/hkStringBuf.h>

	// Physics
#include <Physics/Dynamics/World/hkpWorld.h>
#include <Physics/Dynamics/Entity/hkpRigidBody.h>
#include <Physics/Utilities/Dynamics/Inertia/hkpInertiaTensorComputer.h>
#include <Physics/Collide/hkpCollide.h>   
#include <Physics/Collide/Dispatch/hkpAgentRegisterUtil.h>
#include <Physics/Dynamics/Collide/ContactListener/Util/hkpEndOfStepCallbackUtil.h>

	// Shapes.
#include <Physics/Collide/Shape/Convex/Box/hkpBoxShape.h>  
#include <Physics/Collide/Shape/Convex/Sphere/hkpSphereShape.h>    
#include <Physics/Collide/Shape/Convex/Capsule/hkpCapsuleShape.h>
#include <Physics/Internal/Collide/BvCompressedMesh/hkpBvCompressedMeshShape.h>
#include <Physics/Internal/Collide/StaticCompound/hkpStaticCompoundShape.h>

	// Phantoms.
#include <Physics/Dynamics/Phantom/hkpAabbPhantom.h>

	// CInfo.
#include <Physics/Internal/Collide/BvCompressedMesh/hkpBvCompressedMeshShapeCinfo.h>

	// Filter.
#include <Physics/Collide/Filter/Group/hkpGroupFilter.h>

	// Raycasting.
#include <Physics/Collide/Query/CastUtil/hkpWorldRayCastInput.h>         
#include <Physics/Collide/Query/CastUtil/hkpWorldRayCastOutput.h>    
#include <Physics/Collide/Query/Collector/RayCollector/hkpClosestRayHitCollector.h>
#include <Physics/Collide/Query/Collector/RayCollector/hkpAllRayHitCollector.h>

	// Multithreading.
#include <Common/Base/Thread/Job/ThreadPool/Cpu/hkCpuJobThreadPool.h>
#include <Common/Base/Thread/JobQueue/hkJobQueue.h>
	
	// Character rigid Body.
#include <Physics/Utilities/CharacterControl/CharacterRigidBody/hkpCharacterRigidBody.h>	
#include <Physics/Utilities/CharacterControl/CharacterRigidBody/hkpCharacterRigidBodyListener.h>

	// Character State machine.
#include <Physics/Utilities/CharacterControl/StateMachine/hkpDefaultCharacterStates.h>

	// Reducing collision tolerances between characters and fixed entities.
#include <Physics/Collide/Agent/hkpCollisionQualityInfo.h>
#include <Physics/Collide/Dispatch/hkpCollisionDispatcher.h>
#include <Physics/Collide/Agent3/Machine/Nn/hkpAgentNnTrack.h>
#include <Physics/Dynamics/Collide/hkpSimpleConstraintContactMgr.h>

	// Culling.
#include <Physics/Internal/BroadPhase/TreeBroadPhase/hkpTreeBroadPhase.h>

	// Scene Data.
#include <Common/SceneData/Scene/hkxScene.h>

	// Serialization.
#include <Common/Base/System/Io/IStream/hkIStream.h>
#include <Common/Base/Reflection/hkClass.h>
#include <Common/Base/Reflection/Registry/hkTypeInfoRegistry.h>
#include <Common/Serialize/Util/hkStructureLayout.h>
#include <Common/Serialize/Util/hkRootLevelContainer.h>
#include <Common/Serialize/Util/hkSerializeUtil.h>
#include <Physics/Utilities/Serialize/hkpPhysicsData.h>

	// Visual Debugger includes
#include <Common/Visualize/hkVisualDebugger.h>
#include <Physics/Utilities/VisualDebugger/hkpPhysicsContext.h>

	// Platform specific initialization
#include <Common/Base/System/Init/PlatformInit.cxx>

	// Libraries.
#pragma comment(lib, "hkBase.lib")
#pragma comment(lib, "hkCompat.lib")
#pragma comment(lib, "hkSceneData.lib")
#pragma comment(lib, "hkSerialize.lib")

#pragma comment(lib, "hkVisualize.lib")
#pragma comment(lib, "hkInternal.lib")
#pragma comment(lib, "hkGeometryUtilities.lib")
#pragma comment(lib, "hkcdInternal.lib")

#pragma comment(lib, "hkcdCollide.lib")
#pragma comment(lib, "hkpCollide.lib")
#pragma comment(lib, "hkpConstraintSolver.lib")
#pragma comment(lib, "hkpDynamics.lib")

#pragma comment(lib, "hkpInternal.lib")
#pragma comment(lib, "hkpUtilities.lib")
#pragma comment(lib, "hkpVehicle.lib")

